package at.xne.dojosui

class MiscTagLib {
	static namespace = "dsui"
	
	def menuBarStart = { attrs, body ->
	out << """<div dojoType="dijit.MenuBar" id="${attrs['id']}">"""
	out << """${body()}"""
	out << """</div>"""	
	}
	def menuBarFirstLevelItem = { attrs, body ->
		//TODO-NE add icons to items
		out << """<div dojoType="dijit.PopupMenuBarItem">"""
		out << """<span>${attrs['title']}</span>"""
		out << """<div dojoType="dijit.Menu" id="${attrs['id']}">"""
        out << """${body()}"""
		out << """</div></div>"""
	}
	def menuBarSecondLevelItem = { attrs, body ->
		//TODO-NE add onClick
		//TODO-NE actual only 2 levels available
		out << """<div dojoType="dijit.MenuItem" onClick="${attrs['onClick']}">"""
		out << """${attrs['title']}"""
		out << """</div>"""
	}
}
